//
//  ViewController.m
//  UI01_UIViewHomeworkSecond
//
//  Created by dllo on 16/6/3.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    UIView *view1 = [[UIView alloc]initWithFrame:CGRectMake(50, 100, 100, 50)];
    view1.backgroundColor = [UIColor blueColor];
    [self.view addSubview:view1];
    [view1 release];
    
    UIView *view2 = [[UIView alloc] initWithFrame:CGRectMake(50, 200, 100, 50)];
    view2.backgroundColor = [UIColor blueColor];
    [self.view addSubview:view2];
    [view2 release];
    
    UIView *view3 = [[UIView alloc] initWithFrame:CGRectMake(180, 100, 150, 50)];
    view3.backgroundColor = [UIColor blueColor];
    [self.view addSubview:view3];
    [view3 release];
    
    [self creatBlueViewWithFrame:CGRectMake(180, 200, 150, 50)];
    [self creatBlueViewWithFrame:CGRectMake(90, 300, 80, 50)];
    [self creatBlueViewWithFrame:CGRectMake(250, 300, 80, 50)];
    
    
}

-(void)creatBlueViewWithFrame:(CGRect)frame{
    UIView *view = [[UIView alloc] initWithFrame:frame];
    view.backgroundColor =[UIColor blueColor];
    [self.view addSubview:view];
    [view release];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
